#ifndef MYTHREAD_H
#define MYTHREAD_H

#include <QObject>
#include <QThread>
#include <QVector>

////////////////////////////////////////////////////////////
class Generate : public QObject
{
    Q_OBJECT
public:
    explicit Generate(QObject *parent = 0); // 构造函数
    void working(int num);  // 任务函数

signals:
    void sendArray(QVector<int> num);   // 信号槽发送数据

public slots:

};

////////////////////////////////////////////////////////////
class BubbleSort : public QObject
{
    Q_OBJECT
public:
    explicit BubbleSort(QObject *parent = 0);
    void working(QVector<int> list);

signals:
    void finish(QVector<int> num);  // 排序完成

public slots:


};

////////////////////////////////////////////////////////////
class QuickSort : public QObject
{
    Q_OBJECT
public:
    explicit QuickSort(QObject *parent = 0);
    void working(QVector<int> list);

signals:
    void finish(QVector<int> list);  // 排序完成

public slots:


private:
    void quickSort(QVector<int> &list,int l, int r);   // 快速排序的递归函数
};

#endif // MYTHREAD_H
